##effect size for study 1





vars <- c("Independence", "Obedience", "Curiosity", "Considerate")


##effect size of control vs boy
CFAdata_1b<-subset(CFAdata_1, treatment==3|treatment==2)

irt_data_1b <- subset(CFAdata_1b, select = vars)

group_1b<-as.character(CFAdata_1b$treatment )

table(group_1b)
group_1b <- dplyr::recode(group_1b, "2"="Control", "5"="Girl", "3"="Boy")

mod_configural_1b<-multipleGroup( data=irt_data_1b, 
                                  model=1, 
                                  group= group_1b ) 

empirical_ES(mod_configural_1b)
empirical_ES(mod_configural_1b, DIF=FALSE)




##effect size of control vs girl
CFAdata_1g<-subset(CFAdata_1, treatment==5|treatment==2)

irt_data_1g <- subset(CFAdata_1g, select = vars)

group_1g<-as.character(CFAdata_1g$treatment )

table(group_1g)
group_1g <- dplyr::recode(group_1g, "2"="Control", "5"="Girl", "3"="Boy")

mod_configural_1g<-multipleGroup( data=irt_data_1g, 
                                  model=1, 
                                  group= group_1g ) 

empirical_ES(mod_configural_1g)
empirical_ES(mod_configural_1g, DIF=FALSE)




